package com.znufe.exam.viewmodel.student.course;

import com.znufe.exam.domain.Course;
import com.znufe.exam.viewmodel.BaseVM;
import io.swagger.annotations.ApiModel;
import lombok.Data;

@Data
@ApiModel(value = "搜索界面返回信息")
public class CourseSearchResponseVm extends BaseVM {
    private Integer id;

    private Integer courseType;

    private String courseName;

    private String subtitle;

    private String coverPath;

    private String introduction;

    public static CourseSearchResponseVm from(Course course){
        CourseSearchResponseVm vm = modelMapper.map(course,CourseSearchResponseVm.class);
        return vm;
    }
}
